#include<at89x51.h>
#define led1 P3_4
#define led2 P3_5
#define led P1_0
void delay(unsigned int num)
{
	unsigned int i,j;
	for(i=0;i<num;i++)
		for(j=0;j<1000;j++);
}

void main()
{
	
	unsigned char a;
	a=0x1;
	P0=a;
	while(1)
	{
		a++;
		delay(633333);
		P0=a;
		if(a==0x10)
		{
			a=1;
		}
		else
		{
			a=a<<1;
		}
		
	}
}